package com.easy.frame.servers.sys.vo;

import com.easy.frame.base.api.pojo.BaseVO;
import com.easy.frame.base.api.util.DictFieldFillUtils;
import com.easy.frame.base.basic.enums.DictCodeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;
import java.util.List;

/**
 * @author msp
 * @date 2021/1/8
 */
@Getter
@Setter
@ToString
@ApiModel("企业及机构详情返回实体")
public class SysTenantDetailVO extends BaseVO {

    @ApiModelProperty("企业及机构id")
    private Long tenantId;

    @ApiModelProperty("编号")
    private String code;

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("类型")
    private List<Integer> type;

    @ApiModelProperty("类型描述")
    private String typeName;

    @ApiModelProperty("是否系统管理员，0-否，1-是")
    private Integer sysAdmin;

    @ApiModelProperty("联系人姓名")
    private String contactPerson;

    @ApiModelProperty("办公电话")
    private String telNum;

    @ApiModelProperty("地址")
    private String address;

    @ApiModelProperty("电子邮箱")
    private String email;

    @ApiModelProperty("网址")
    private String website;

    @ApiModelProperty("统一社会信用代码")
    private String creditCode;

    @ApiModelProperty("是否有效，0-无效，1-有效")
    private Integer enabled;

    @ApiModelProperty("是否拥有所有权限[0：不是所有，1：所有权限]")
    private Integer allAuth;

    @ApiModelProperty("IT管理员登录账号")
    private String loginId;

    @ApiModelProperty("最近密码重置人id")
    private Integer passwordUpdateBy;

    @ApiModelProperty("最近密码重置人姓名")
    private String passwordUpdateByName;

    @ApiModelProperty("最近密码重置时间")
    private Date passwordUpdateTime;

    public String getTypeName() {
        return DictFieldFillUtils.getNames(DictCodeEnum.ORG_TYPE, type, typeName);
    }
}